#pragma once
#include "Runtime/BattleFirePrefix.h"
#ifdef BATTLEFIRE_WIN_PLAYER
#include <gl/GL.h>
#include <gl/GLU.h>
#ifndef GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS
#define GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS 0x90D6
#endif
#ifndef GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS
#define GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS 0x90D7
#endif
#ifndef GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS
#define GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS 0x90D8
#endif
#ifndef GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS
#define GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS 0x90D9
#endif
#ifndef GL_MAX_FRAGMENT_SHADER_STORAGE_BLOCKS
#define GL_MAX_FRAGMENT_SHADER_STORAGE_BLOCKS 0x90DA
#endif
#ifndef GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS
#define GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS 0x90DB
#endif
#ifndef GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS
#define GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS 0x90DC
#endif
typedef void(BATTLEFIRE_APICALL* PFNGLFRAMEBUFFERTEXTUREMULTIVIEWOVR)(GLenum, GLenum, GLuint, GLint, GLint, GLsizei);
typedef void(BATTLEFIRE_APICALL* PFNGLDISCARDFRAMEBUFFEREXT)(GLenum, GLsizei, const GLenum*);
typedef void(BATTLEFIRE_APICALL* PFNGLDISPATCHCOMPUTE) (GLuint, GLuint, GLuint);
typedef void(BATTLEFIRE_APICALL* PFNINSERTEVENTMARKER)(GLsizei, const char*);
typedef void(BATTLEFIRE_APICALL* PFNPUSHGROUPMARKER)(GLsizei, const char*);
typedef void(BATTLEFIRE_APICALL* PFNPOPGROUPMARKER)();

void CheckLastOpenGLError(const char* prefix, const char* file, long line, const char* operation);
#if _DEBUG
#define OGL_CALL(x) do { x; CheckLastOpenGLError (NULL,__FILE__, __LINE__,#x); } while(0)
#else
#define OGL_CALL(x) x;
#endif
#endif